<template>
  <el-input
    v-model="formData[_info.field]"
    type="textarea"
    resize="none"
    :rows="_info.rows || 5"
    :maxlength="_rules.max_length || undefined"
    :show-word-limit="_info.show_word_limit || false"
    :disabled="_info.disabled || false"
    :placeholder="_info.placeholder || '请输入'"
  />
</template>

<script setup>
import { getInfo, getRules } from '../const';

const props = defineProps({
  formInfo: {
    type: Object,
    default: () => {}
  },
  formData: {
    type: Object,
    default: () => {}
  },
  topExpose: {
    type: Object,
    default: () => {}
  }
});

const _info = computed(() => getInfo(props.formInfo));
const _rules = computed(() => getRules(props.formInfo));
</script>

<style lang="scss" scoped></style>
